<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>Class LeanCloud\Engine\LeanEngine</title>

	<link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
				<h3>Namespaces</h3>
			<ul>
				<li class="active">
					<a href="namespace-LeanCloud.html">
						LeanCloud<span></span>
					</a>

						<ul>
				<li class="active">
					<a href="namespace-LeanCloud.Engine.html">
						Engine					</a>

						</li>
				<li>
					<a href="namespace-LeanCloud.Operation.html">
						Operation					</a>

						</li>
				<li>
					<a href="namespace-LeanCloud.Storage.html">
						Storage					</a>

						</li>
				<li>
					<a href="namespace-LeanCloud.Uploader.html">
						Uploader					</a>

						</li>
							</ul></li>
			</ul>
		</div>

		<hr>


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-LeanCloud.Engine.Cloud.html">Cloud</a></li>
				<li><a href="class-LeanCloud.Engine.LaravelEngine.html">LaravelEngine</a></li>
				<li class="active"><a href="class-LeanCloud.Engine.LeanEngine.html">LeanEngine</a></li>
				<li><a href="class-LeanCloud.Engine.SlimEngine.html">SlimEngine</a></li>
			</ul>



			<h3>Exceptions</h3>
			<ul>
				<li><a href="class-LeanCloud.Engine.FunctionError.html">FunctionError</a></li>
			</ul>


		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="">
		<input type="hidden" name="ie" value="UTF-8">
		<input type="text" name="q" class="text" placeholder="Search">
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="namespace-LeanCloud.Engine.html" title="Summary of LeanCloud\Engine"><span>Namespace</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class LeanEngine</h1>





	<div>
		<h4>Direct known subclasses</h4>
			<a href="class-LeanCloud.Engine.LaravelEngine.html">LeanCloud\Engine\LaravelEngine</a>, 
			<a href="class-LeanCloud.Engine.SlimEngine.html">LeanCloud\Engine\SlimEngine</a>
	</div>






	<div class="info">
		
		
		<b>Namespace:</b> <a href="namespace-LeanCloud.html">LeanCloud</a>\<a href="namespace-LeanCloud.Engine.html">Engine</a><br>
		

			<b>Located at</b> <a href="source-class-LeanCloud.Engine.LeanEngine.html#9-604" title="Go to source code">LeanCloud/Engine/LeanEngine.php</a>
		<br>
	</div>



	<table class="summary methods" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="getHeaderLine" id="_getHeaderLine">

		<td class="attributes"><code>
			 protected 

			string|null
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getHeaderLine">#</a>
		<code><a href="source-class-LeanCloud.Engine.LeanEngine.html#48-59" title="Go to source code">getHeaderLine</a>( <span>string <var>$key</var></span> )</code>

		<div class="description short">
			<p>Get header value</p>
		</div>

		<div class="description detailed hidden">
			<p>Get header value</p>


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$key</var></dt>
					<dd></dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					string|null
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="withHeader" id="_withHeader">

		<td class="attributes"><code>
			 protected 

			<code><a href="class-LeanCloud.Engine.LeanEngine.html">LeanCloud\Engine\LeanEngine</a></code>
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_withHeader">#</a>
		<code><a href="source-class-LeanCloud.Engine.LeanEngine.html#61-71" title="Go to source code">withHeader</a>( <span>string <var>$key</var></span>, <span>string <var>$val</var></span> )</code>

		<div class="description short">
			<p>Set header</p>
		</div>

		<div class="description detailed hidden">
			<p>Set header</p>


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$key</var></dt>
					<dd>Header key</dd>
					<dt><var>$val</var></dt>
					<dd>Header val</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code><a href="class-LeanCloud.Engine.LeanEngine.html">LeanCloud\Engine\LeanEngine</a></code>
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="send" id="_send">

		<td class="attributes"><code>
			 protected 

			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_send">#</a>
		<code><a href="source-class-LeanCloud.Engine.LeanEngine.html#73-83" title="Go to source code">send</a>( <span>string <var>$body</var></span>, <span>string <var>$status</var></span> )</code>

		<div class="description short">
			<p>Send response with body and status code</p>
		</div>

		<div class="description detailed hidden">
			<p>Send response with body and status code</p>


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$body</var></dt>
					<dd>Response body</dd>
					<dt><var>$status</var></dt>
					<dd>Response status</dd>
				</dl></div>





		</div>
		</div></td>
	</tr>
	<tr data-order="redirect" id="_redirect">

		<td class="attributes"><code>
			 protected 

			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_redirect">#</a>
		<code><a href="source-class-LeanCloud.Engine.LeanEngine.html#85-94" title="Go to source code">redirect</a>( <span>string <var>$url</var></span> )</code>

		<div class="description short">
			<p>Redirect to URL</p>
		</div>

		<div class="description detailed hidden">
			<p>Redirect to URL</p>


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$url</var></dt>
					<dd></dd>
				</dl></div>





		</div>
		</div></td>
	</tr>
	<tr data-order="getBody" id="_getBody">

		<td class="attributes"><code>
			 protected 

			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getBody">#</a>
		<code><a href="source-class-LeanCloud.Engine.LeanEngine.html#96-108" title="Go to source code">getBody</a>( )</code>

		<div class="description short">
			<p>Get request body string</p>
		</div>

		<div class="description detailed hidden">
			<p>Get request body string</p>

<p>It reads body from <code>php://input</code>, which has cavets that it could be
read only once prior to php 5.6. Thus it is recommended to override
this method in subclass.</p>



				<h4>Returns</h4>
				<div class="list">
					string
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="dispatch" id="_dispatch">

		<td class="attributes"><code>
			 protected 

			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_dispatch">#</a>
		<code><a href="source-class-LeanCloud.Engine.LeanEngine.html#318-430" title="Go to source code">dispatch</a>( <span>string <var>$method</var></span>, <span>string <var>$url</var></span> )</code>

		<div class="description short">
			<p>Dispatch request</p>
		</div>

		<div class="description detailed hidden">
			<p>Dispatch request</p>

<p>Following routes are processed and returned by LeanEngine:</p>

<pre><code>OPTIONS {1,1.1}/{functions,call}.*
*       __engine/1/ping
*      {1,1.1}/{functions,call}/_ops/metadatas
*      {1,1.1}/{functions,call}/onVerified/{sms,email}
*      {1,1.1}/{functions,call}/BigQuery/onComplete
*      {1,1.1}/{functions,call}/{className}/{hookName}
*      {1,1.1}/{functions,call}/{funcName}
</code></pre>

<p>others may be added in future.</p>


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$method</var></dt>
					<dd>Request method</dd>
					<dt><var>$url</var></dt>
					<dd>Request url</dd>
				</dl></div>





		</div>
		</div></td>
	</tr>
	<tr data-order="start" id="_start">

		<td class="attributes"><code>
			 public 

			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_start">#</a>
		<code><a href="source-class-LeanCloud.Engine.LeanEngine.html#577-583" title="Go to source code">start</a>( )</code>

		<div class="description short">
			<p>Start engine and process request</p>
		</div>

		<div class="description detailed hidden">
			<p>Start engine and process request</p>







		</div>
		</div></td>
	</tr>
	<tr data-order="enableHttpsRedirect" id="_enableHttpsRedirect">

		<td class="attributes"><code>
			 public static

			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_enableHttpsRedirect">#</a>
		<code><a href="source-class-LeanCloud.Engine.LeanEngine.html#597-602" title="Go to source code">enableHttpsRedirect</a>( )</code>

		<div class="description short">
			<p>Enable https redirect</p>
		</div>

		<div class="description detailed hidden">
			<p>Enable https redirect</p>







		</div>
		</div></td>
	</tr>
	</table>












	<table class="summary properties" id="properties">
	<caption>Properties summary</caption>
	<tr data-order="useHttpsRedirect" id="$useHttpsRedirect">
		<td class="attributes"><code>
			protected static 
			boolean
		</code></td>

		<td class="name">
				<a href="source-class-LeanCloud.Engine.LeanEngine.html#35-39" title="Go to source code"><var>$useHttpsRedirect</var></a>

			<div class="description short">
				<p>Redirect to https or not</p>
			</div>

			<div class="description detailed hidden">
				<p>Redirect to https or not</p>

			</div>
		</td>
		<td class="value">
			<div>
				<a href="#$useHttpsRedirect" class="anchor">#</a>
				<code><span class="php-keyword1">false</span></code>
			</div>
		</td>
	</tr>
	<tr data-order="env" id="$env">
		<td class="attributes"><code>
			protected  
			array
		</code></td>

		<td class="name">
				<a href="source-class-LeanCloud.Engine.LeanEngine.html#41-46" title="Go to source code"><var>$env</var></a>

			<div class="description short">
				<p>Parsed LeanEngine env variables</p>
			</div>

			<div class="description detailed hidden">
				<p>Parsed LeanEngine env variables</p>

			</div>
		</td>
		<td class="value">
			<div>
				<a href="#$env" class="anchor">#</a>
				<code><span class="php-keyword1">array</span>()</code>
			</div>
		</td>
	</tr>
	</table>






</div>

	<div id="footer">
		 API documentation generated by <a href="http://apigen.org">ApiGen</a>
	</div>
</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>
